
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{{ resume.title }}</title>
    <style>
        body {
            font-family: 'SimHei', 'Arial', sans-serif;
            line-height: 1.6;
            color: #333;
            max-width: 800px;
            margin: 0 auto;
            padding: 20px;
        }
        h1, h2, h3 {
            color: #2c3e50;
            margin-top: 0;
        }
        h1 {
            font-size: 24px;
            border-bottom: 2px solid #3498db;
            padding-bottom: 5px;
        }
        h2 {
            font-size: 18px;
            margin-top: 20px;
            border-left: 4px solid #9b59b6;
            padding-left: 10px;
        }
        .personal-info {
            margin-bottom: 20px;
        }
        .section {
            margin-bottom: 20px;
        }
        .item {
            margin-bottom: 15px;
        }
        .item-header {
            font-weight: bold;
            display: flex;
            justify-content: space-between;
        }
        .skills {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }
        .skill-tag {
            background-color: #ecf0f1;
            padding: 3px 10px;
            border-radius: 15px;
            font-size: 14px;
        }
    </style>
</head>
<body>
    <h1>{{ resume.personal_info.full_name }}</h1>
    
    <div class="personal-info">
        {% if resume.personal_info.email %}Email: {{ resume.personal_info.email }} | {% endif %}
        {% if resume.personal_info.phone %}Phone: {{ resume.personal_info.phone }} | {% endif %}
        {% if resume.personal_info.address %}Address: {{ resume.personal_info.address }}{% endif %}
    </div>
    
    {% if resume.personal_info.summary %}
    <div class="section">
        <h2>个人总结</h2>
        <p>{{ resume.personal_info.summary }}</p>
    </div>
    {% endif %}
    
    {% if resume.education %}
    <div class="section">
        <h2>教育经历</h2>
        {% for edu in resume.education %}
        <div class="item">
            <div class="item-header">
                <span>{{ edu.institution }}</span>
                <span>{{ edu.start_date }} - {{ edu.end_date }}</span>
            </div>
            <div>{{ edu.degree }}, {{ edu.major }}</div>
            {% if edu.description %}
            <p>{{ edu.description }}</p>
            {% endif %}
        </div>
        {% endfor %}
    </div>
    {% endif %}
    
    {% if resume.work_experience %}
    <div class="section">
        <h2>工作/实习经历</h2>
        {% for exp in resume.work_experience %}
        <div class="item">
            <div class="item-header">
                <span>{{ exp.position }} at {{ exp.company }}</span>
                <span>{{ exp.start_date }} - {{ exp.end_date }}</span>
            </div>
            {% if exp.description %}
            <p>{{ exp.description }}</p>
            {% endif %}
            {% if exp.achievements %}
            <p><strong>成就：</strong>{{ exp.achievements }}</p>
            {% endif %}
        </div>
        {% endfor %}
    </div>
    {% endif %}
    
    {% if resume.skills %}
    <div class="section">
        <h2>技能</h2>
        <div class="skills">
            {% for skill in resume.skills %}
            <span class="skill-tag">{{ skill.name }} ({{ skill.level }}/5)</span>
            {% endfor %}
        </div>
    </div>
    {% endif %}
    
    {% if resume.certificates %}
    <div class="section">
        <h2>证书</h2>
        {% for cert in resume.certificates %}
        <div class="item">
            <div class="item-header">
                <span>{{ cert.name }}</span>
                <span>{{ cert.issue_date }}</span>
            </div>
            {% if cert.issuing_authority %}
            <div>颁发机构：{{ cert.issuing_authority }}</div>
            {% endif %}
        </div>
        {% endfor %}
    </div>
    {% endif %}
</body>
</html>
    